|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Empaquetar programa y Combo BoxHola a todos, bueno, ya estoy finalizando mi primer proyecto en Gambas y
la verdad es que estoy muy contento. Solo tengo algunas dudas, a ver si me podeis hechar una mano: + Para distribuir mi aplicación, genero un archivo .deb. Este archivo, instala el programa pero no las carpetas/ficheros que necesito para que el programa funciones (base de datos...). Puedo modificar el archivo .deb para que instale ficheros tales como bases de datos SQLite, archivos HTML... De ser así, ¿sabeis de alguna referencia en internet? + Combo Box: Es una cosa que me ha extrañado. No existe la opcion de style en los combo box como si la tenía visual basic. De este modo, el usuario puede escribir en el combo, pero yo solo quiero que elija. ¿Alguna idea? PD: Os adjunto una captura del programa (enlace), por si alguien quiere sugerirme algo. Es un catalogador de peliculas. ¿Os gusta o cambiariais algo? http://www.arastsoftware.es/imagenes/captura.png ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user-es mailing list Gambas-user-es@... https://lists.sourceforge.net/lists/listinfo/gambas-user-es |
|
|
Re: Empaquetar programa y Combo BoxBuen día, te contesto entre lineas
El 31 de agosto de 2009 16:21, Angel Romero Astorga <aromeroastorga@...> escribió: Hola a todos, bueno, ya estoy finalizando mi primer proyecto en Gambas y Puedes hacer que antes de que inicie la aplicacion verifique si existen las carpetas, archivos y la base de datos y la cree en caso de que no existan + Combo Box: Es una cosa que me ha extrañado. No existe la opcion de para eso está la propiedad readonly PD: Os adjunto una captura del programa (enlace), por si alguien quiere se ve muy bueno el programa, avisa cuando lo publiques para revisarlo y aportar idéas :) ------------------------------------------------------------------------------ ------ William Cabrera http://willicab.tumblr.com http://www.twitter.com/willicab http://www.gnewbook.org/pg/profile/willicab ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user-es mailing list Gambas-user-es@... https://lists.sourceforge.net/lists/listinfo/gambas-user-es |
|
|
Re: Empaquetar programa y Combo BoxWilliam Cabrera wrote:
> Buen día, te contesto entre lineas > > El 31 de agosto de 2009 16:21, Angel Romero Astorga > <aromeroastorga@... <mailto:aromeroastorga@...>> escribió: > > Hola a todos, bueno, ya estoy finalizando mi primer proyecto en > Gambas y > la verdad es que estoy muy contento. Solo tengo algunas dudas, a > ver si > me podeis hechar una mano: > > + Para distribuir mi aplicación, genero un archivo .deb. Este > archivo, > instala el programa pero no las carpetas/ficheros que necesito > para que > el programa funciones (base de datos...). Puedo modificar el archivo > .deb para que instale ficheros tales como bases de datos SQLite, > archivos HTML... De ser así, ¿sabeis de alguna referencia en internet? > > Puedes hacer que antes de que inicie la aplicacion verifique si > existen las carpetas, archivos y la base de datos y la cree en caso de > que no existan > > > + Combo Box: Es una cosa que me ha extrañado. No existe la opcion de > style en los combo box como si la tenía visual basic. De este modo, el > usuario puede escribir en el combo, pero yo solo quiero que elija. > ¿Alguna idea? > > para eso está la propiedad readonly > > > PD: Os adjunto una captura del programa (enlace), por si alguien > quiere > sugerirme algo. Es un catalogador de peliculas. ¿Os gusta o > cambiariais > algo? > > http://www.arastsoftware.es/imagenes/captura.png > > se ve muy bueno el programa, avisa cuando lo publiques para revisarlo > y aportar idéas :) > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports > 2008 30-Day > trial. Simplify your report design, integration and deployment - > and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user-es mailing list > Gambas-user-es@... > <mailto:Gambas-user-es@...> > https://lists.sourceforge.net/lists/listinfo/gambas-user-es > > > ------ > William Cabrera > http://willicab.tumblr.com > http://www.twitter.com/willicab > http://www.gnewbook.org/pg/profile/willicab > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > ------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user-es mailing list > Gambas-user-es@... > https://lists.sourceforge.net/lists/listinfo/gambas-user-es > + Referente al combo, la propiedad Read-Only es exactamente lo que buscaba. El caso es que la probé antes, pero parecia no funcionar. Debe ser una laguna mental, muchas gracias + Referente a las carpetas, puedo crear carpetas las que quiere pero... y la BBDD?? y la plantilla HTML? necesito incluir estos archivos en la instalación + El proyecto, pues lo abriré al publico nada más tenga una versión sin fallas y que se instale facilmente. Por supuesto, con el codigo abierto. Saludos ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user-es mailing list Gambas-user-es@... https://lists.sourceforge.net/lists/listinfo/gambas-user-es |
|
|
Re: Empaquetar programa y Combo Box> Date: Mon, 31 Aug 2009 16:21:05 +0200 > From: aromeroastorga@... > To: gambas-user-es@... > Subject: [Gambas-user-es] Empaquetar programa y Combo Box > > Hola a todos, bueno, ya estoy finalizando mi primer proyecto en Gambas y > la verdad es que estoy muy contento. Solo tengo algunas dudas, a ver si > me podeis hechar una mano: > > + Para distribuir mi aplicación, genero un archivo .deb. Este archivo, > instala el programa pero no las carpetas/ficheros que necesito para que > el programa funciones (base de datos...). Puedo modificar el archivo > .deb para que instale ficheros tales como bases de datos SQLite, > archivos HTML... De ser así, ¿sabeis de alguna referencia en internet? > > + Combo Box: Es una cosa que me ha extrañado. No existe la opcion de > style en los combo box como si la tenía visual basic. De este modo, el > usuario puede escribir en el combo, pero yo solo quiero que elija. > ¿Alguna idea? > > PD: Os adjunto una captura del programa (enlace), por si alguien quiere > sugerirme algo. Es un catalogador de peliculas. ¿Os gusta o cambiariais > algo? > > http://www.arastsoftware.es/imagenes/captura.png > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user-es mailing list > Gambas-user-es@... > https://lists.sourceforge.net/lists/listinfo/gambas-user-es ¿Aún no lo has descargado? Haz clic Internet Explorer 8 especial para MSN - ¡Gratis! ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user-es mailing list Gambas-user-es@... https://lists.sourceforge.net/lists/listinfo/gambas-user-es |
|
|
Re: Empaquetar programa y Combo Boxbueno te explico, supongo que inicias el programa desde un sub main, entonces te pondré un ejemplo de como podrías hacerlo:
PUBLIC SUB Main() DIM hTable AS Table DIM rutaApp as String rutaApp = user.home &/ "ruta/de/la/conf" ' Creo la carpeta de configuración si no existe IF NOT Exist(Funciones.rutaApp) THEN MKDIR Funciones.rutaApp ' Creo la conexión hconn = NEW Connection hconn.Type = "mysql" hconn.Host = "localhost" hconn.Login = "login" hconn.Password = "pass" hconn.Open ' Revisa si existe la base de datos, si no la crea IF NOT hconn.Databases.Exist("basedatos") THEN hconn.Databases.Add("basedatos") hconn.Close hconn.Name = "basedatos" hconn.Open IF NOT hconn.Tables.Exist("tabla") THEN hTable = hconn.Tables.Add("tabla") hTable.Fields.Add("campo1", db.serial) hTable.Fields.Add("campo2", db.String, 0) hTable.Fields.Add("campo3", db.Date) hTable.PrimaryKey = ["campo1"] hTable.Update ENDIF END para lo de la plantilla te dejo una función que hice para una app que me pidieron, puedes modificarla a tu gusto PUBLIC SUB ImprimirReporteMateriales(myGrid AS GridView) DIM hFile AS File DIM rutaReporteCompra AS String DIM i AS Integer rutaReporteCompra = Funciones.rutaApp &/ "reporte.htm" OPEN rutaReporteCompra FOR WRITE CREATE AS #hFile PRINT #hFile, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" PRINT #hFile, "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"es\" lang=\"es\">" PRINT #hFile, " <head>" PRINT #hFile, " <title>Reporte de compra</title>" PRINT #hFile, " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />" PRINT #hFile, " <style>" PRINT #hFile, " td {" PRINT #hFile, " padding:3px;" PRINT #hFile, " }" PRINT #hFile, " </style>" PRINT #hFile, " </head>" PRINT #hFile, "<body onload=\"window.print();\" style=\"font-size:10pt\">" PRINT #hFile, " <table style=\"width:100%;\" cellpadding=\"0\" cellspacing=\"0\">" PRINT #hFile, " <tr><td rowspan=\"3\" style=\"text-align:center;border:1px solid #000;border-right:0px\"><img src=\"logo-ubv.png\" alt=\"Logo UBV\" /></td>" PRINT #hFile, " <td style=\"text-align:center;border:1px solid #000;border-bottom:0;border-left:0\">REP\xC3\x9ABLICA BOLIVARIANA DE VENEZUELA</td></tr>" PRINT #hFile, " <tr><td style=\"text-align:center;border:1px solid #000;border-bottom:0;border-top:0;border-left:0\">UNIVERSIDAD BOLIVARIANA DE VENEZUELA</td></tr>" PRINT #hFile, " <tr><td style=\"text-align:center;border:1px solid #000;border-top:0;border-left:0\">DIRECCI\xC3\x93N DE ADMINISTRACI\xC3\x93N</td></tr>" PRINT #hFile, " <table style=\"width:100%;margin:5px 0 5px 0\" cellpadding=\"0\" cellspacing=\"0\">" PRINT #hFile, " <tr><td colspan=\"3\" style=\"text-align:center;font-weight:bold;border:1px solid #000\">LISTADO DE MATERIALES</td></tr></table>" PRINT #hFile, " <table style=\"width:100%;margin:5px 0 5px 0\" cellpadding=\"0\" cellspacing=\"0\" border=1>" PRINT #hFile, " <tr><th>Código Contable</th><th>Descripción</th><th>Proveedor</th><th>Stock Mínimo</th><th>Cantidad</th></tr>" FOR i = 0 TO myGrid.Rows.Count - 1 PRINT #hFile, " <tr>" PRINT #hFile, " <td>" & myGrid[i, 0].Text & "</td>" PRINT #hFile, " <td>" & myGrid[i, 1].Text & "</td>" PRINT #hFile, " <td>" & myGrid[i, 2].Text & "</td>" PRINT #hFile, " <td>" & myGrid[i, 3].Text & "</td>" PRINT #hFile, " <td>" & myGrid[i, 4].Text & "</td>" PRINT #hFile, " </tr>" NEXT PRINT #hFile, "</body></html>" CLOSE #hFile EXEC [Funciones.Navegador, rutaReporteCompra] END Salu2 espero que te sirva ------ William Cabrera http://willicab.tumblr.com http://www.twitter.com/willicab http://www.gnewbook.org/pg/profile/willicab El 31 de agosto de 2009 10:45, Angel Romero Astorga <aromeroastorga@...> escribió:
------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user-es mailing list Gambas-user-es@... https://lists.sourceforge.net/lists/listinfo/gambas-user-es |
|
|
Re: Empaquetar programa y Combo BoxWilliam Cabrera wrote:
> bueno te explico, supongo que inicias el programa desde un sub main, > entonces te pondré un ejemplo de como podrías hacerlo: > > PUBLIC SUB Main() > DIM hTable AS Table > DIM rutaApp as String > > rutaApp = user.home &/ "ruta/de/la/conf" > ' Creo la carpeta de configuración si no existe > IF NOT Exist(Funciones.rutaApp) THEN MKDIR Funciones.rutaApp > > ' Creo la conexión > hconn = NEW Connection > hconn.Type = "mysql" > hconn.Host = "localhost" > hconn.Login = "login" > hconn.Password = "pass" > hconn.Open > > ' Revisa si existe la base de datos, si no la crea > IF NOT hconn.Databases.Exist("basedatos") THEN > hconn.Databases.Add("basedatos") > hconn.Close > hconn.Name = "basedatos" > hconn.Open > > IF NOT hconn.Tables.Exist("tabla") THEN > hTable = hconn.Tables.Add("tabla") > hTable.Fields.Add("campo1", db.serial) > hTable.Fields.Add("campo2", db.String, 0) > hTable.Fields.Add("campo3", db.Date) > hTable.PrimaryKey = ["campo1"] > hTable.Update > ENDIF > END > > para lo de la plantilla te dejo una función que hice para una app que > me pidieron, puedes modificarla a tu gusto > > PUBLIC SUB ImprimirReporteMateriales(myGrid AS GridView) > DIM hFile AS File > DIM rutaReporteCompra AS String > DIM i AS Integer > > rutaReporteCompra = Funciones.rutaApp &/ "reporte.htm" > OPEN rutaReporteCompra FOR WRITE CREATE AS #hFile > > PRINT #hFile, "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 > Transitional//EN\" > \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">" > PRINT #hFile, "<html xmlns=\"http://www.w3.org/1999/xhtml\" > xml:lang=\"es\" lang=\"es\">" > PRINT #hFile, " <head>" > PRINT #hFile, " <title>Reporte de compra</title>" > PRINT #hFile, " <meta http-equiv=\"Content-Type\" > content=\"text/html; />" > PRINT #hFile, " <style>" > PRINT #hFile, " td {" > PRINT #hFile, " padding:3px;" > PRINT #hFile, " }" > PRINT #hFile, " </style>" > PRINT #hFile, " </head>" > PRINT #hFile, "<body onload=\"window.print();\" > style=\"font-size:10pt\">" > PRINT #hFile, " <table style=\"width:100%;\" cellpadding=\"0\" > cellspacing=\"0\">" > PRINT #hFile, " <tr><td rowspan=\"3\" > style=\"text-align:center;border:1px solid > #000;border-right:0px\"><img src=\"logo-ubv.png\" alt=\"Logo UBV\" > /></td>" > PRINT #hFile, " <td style=\"text-align:center;border:1px solid > #000;border-bottom:0;border-left:0\">REP\xC3\x9ABLICA BOLIVARIANA DE > VENEZUELA</td></tr>" > PRINT #hFile, " <tr><td style=\"text-align:center;border:1px > solid #000;border-bottom:0;border-top:0;border-left:0\">UNIVERSIDAD > BOLIVARIANA DE VENEZUELA</td></tr>" > PRINT #hFile, " <tr><td style=\"text-align:center;border:1px > solid #000;border-top:0;border-left:0\">DIRECCI\xC3\x93N DE > ADMINISTRACI\xC3\x93N</td></tr>" > PRINT #hFile, " <table style=\"width:100%;margin:5px 0 5px 0\" > cellpadding=\"0\" cellspacing=\"0\">" > PRINT #hFile, " <tr><td colspan=\"3\" > style=\"text-align:center;font-weight:bold;border:1px solid > #000\">LISTADO DE MATERIALES</td></tr></table>" > PRINT #hFile, " <table style=\"width:100%;margin:5px 0 5px 0\" > cellpadding=\"0\" cellspacing=\"0\" border=1>" > PRINT #hFile, " <tr><th>Código > Contable</th><th>Descripción</th><th>Proveedor</th><th>Stock > Mínimo</th><th>Cantidad</th></tr>" > FOR i = 0 TO myGrid.Rows.Count - 1 > PRINT #hFile, " <tr>" > PRINT #hFile, " <td>" & myGrid[i, 0].Text & "</td>" > PRINT #hFile, " <td>" & myGrid[i, 1].Text & "</td>" > PRINT #hFile, " <td>" & myGrid[i, 2].Text & "</td>" > PRINT #hFile, " <td>" & myGrid[i, 3].Text & "</td>" > PRINT #hFile, " <td>" & myGrid[i, 4].Text & "</td>" > PRINT #hFile, " </tr>" > NEXT > PRINT #hFile, "</body></html>" > CLOSE #hFile > EXEC [Funciones.Navegador, rutaReporteCompra] > END > > Salu2 espero que te sirva > ------ > William Cabrera > http://willicab.tumblr.com > http://www.twitter.com/willicab > http://www.gnewbook.org/pg/profile/willicab > > > El 31 de agosto de 2009 10:45, Angel Romero Astorga > <aromeroastorga@... <mailto:aromeroastorga@...>> escribió: > > William Cabrera wrote: > > Buen día, te contesto entre lineas > > > > El 31 de agosto de 2009 16:21, Angel Romero Astorga > > <aromeroastorga@... <mailto:aromeroastorga@...> > <mailto:aromeroastorga@... > <mailto:aromeroastorga@...>>> escribió: > > > > Hola a todos, bueno, ya estoy finalizando mi primer proyecto en > > Gambas y > > la verdad es que estoy muy contento. Solo tengo algunas dudas, a > > ver si > > me podeis hechar una mano: > > > > + Para distribuir mi aplicación, genero un archivo .deb. Este > > archivo, > > instala el programa pero no las carpetas/ficheros que necesito > > para que > > el programa funciones (base de datos...). Puedo modificar el > archivo > > .deb para que instale ficheros tales como bases de datos SQLite, > > archivos HTML... De ser así, ¿sabeis de alguna referencia en > internet? > > > > Puedes hacer que antes de que inicie la aplicacion verifique si > > existen las carpetas, archivos y la base de datos y la cree en > caso de > > que no existan > > > > > > + Combo Box: Es una cosa que me ha extrañado. No existe la > opcion de > > style en los combo box como si la tenía visual basic. De > este modo, el > > usuario puede escribir en el combo, pero yo solo quiero que > elija. > > ¿Alguna idea? > > > > para eso está la propiedad readonly > > > > > > PD: Os adjunto una captura del programa (enlace), por si alguien > > quiere > > sugerirme algo. Es un catalogador de peliculas. ¿Os gusta o > > cambiariais > > algo? > > > > http://www.arastsoftware.es/imagenes/captura.png > > > > se ve muy bueno el programa, avisa cuando lo publiques para > revisarlo > > y aportar idéas :) > > > > > > > ------------------------------------------------------------------------------ > > Let Crystal Reports handle the reporting - Free Crystal Reports > > 2008 30-Day > > trial. Simplify your report design, integration and deployment - > > and focus on > > what you do best, core application coding. Discover what's > new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Gambas-user-es mailing list > > Gambas-user-es@... > <mailto:Gambas-user-es@...> > > <mailto:Gambas-user-es@... > <mailto:Gambas-user-es@...>> > > https://lists.sourceforge.net/lists/listinfo/gambas-user-es > > > > > > ------ > > William Cabrera > > http://willicab.tumblr.com > > http://www.twitter.com/willicab > > http://www.gnewbook.org/pg/profile/willicab > > > > > ------------------------------------------------------------------------ > > > > > ------------------------------------------------------------------------------ > > Let Crystal Reports handle the reporting - Free Crystal Reports > 2008 30-Day > > trial. Simplify your report design, integration and deployment - > and focus on > > what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Gambas-user-es mailing list > > Gambas-user-es@... > <mailto:Gambas-user-es@...> > > https://lists.sourceforge.net/lists/listinfo/gambas-user-es > > > Hola William, gracias por contestar. Te comento: > > + Referente al combo, la propiedad Read-Only es exactamente lo que > buscaba. El caso es que la probé antes, pero parecia no funcionar. > Debe > ser una laguna mental, muchas gracias > > + Referente a las carpetas, puedo crear carpetas las que quiere > pero... y la BBDD?? y la plantilla HTML? necesito incluir estos > archivos > en la instalación > > + El proyecto, pues lo abriré al publico nada más tenga una versión > sin fallas y que se instale facilmente. Por supuesto, con el > codigo abierto. > > Saludos > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports > 2008 30-Day > trial. Simplify your report design, integration and deployment - > and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gambas-user-es mailing list > Gambas-user-es@... > <mailto:Gambas-user-es@...> > https://lists.sourceforge.net/lists/listinfo/gambas-user-es > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > ------------------------------------------------------------------------ > > _______________________________________________ > Gambas-user-es mailing list > Gambas-user-es@... > https://lists.sourceforge.net/lists/listinfo/gambas-user-es > dedo!! ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user-es mailing list Gambas-user-es@... https://lists.sourceforge.net/lists/listinfo/gambas-user-es |
| Free embeddable forum powered by Nabble | Forum Help |