Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Re: RebGUI and SQLite

From: robert::muench::robertmuench::de at: 15-Mar-2008 13:14

On Fri, 14 Mar 2008 17:42:35 +0100, Jim Richards <> wrote:
> Does anyone have any sample code for using Rebgui and Sqlite. I'm looking > for samples on how best to populate rebgui fields from queries.
Hi Jim, there are several options how to handle this. First, I don't think coupling GUI and database stuff directly is a good idea. I have used an intermediate layer that can translate from a record to a GUI and the other way. The idea is like this: - I put my GUIs (every form) into a single named context - I use three pseudo words to frame what gets into a database and how: START STOP END - Everything between START STOP into own column - Everything between STOP END into a name/value block stored in one column - I have a handler that walks the context and can identify RebGUI widget by type - Depending on the type, - widget-name/text, widget-name/data etc. is used to get the widget content - SHOW-TEXT, SHOW-DATA etc. is used to set widget content Hope this helps to give you an idea how to do it. Robert