[Gambas-devel] "Settings" Component MIA

goolem a.terpotiz at ...176...
Tue Apr 28 22:28:42 CEST 2009




Gareth Bult-3 wrote:
> 
> Hi, 
> 
> Although I've included gb.settings into my project the following gives an
> error; 
> 
> Settings["123"] = 10 
> 
> "Not an array!" 
> 
> .. this uses to work .. has the syntax changed or is the module broken ? 
> 
> tia 
> Gareth. 
> 
> -- 
> Managing Director, Encryptec Limited 
> Tel: 0845 5082719, Mob: 0785 3305393 
> Email: gareth at ...560... 
> Statements made are at all times subject to Encryptec's Terms and
> Conditions of Business, which are available upon request. 
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> Gambas-devel mailing list
> Gambas-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-devel
> 
> 

Hi,

I have the same Problem on Gambas 2.0.0.

When i create a new Project and will use the Settings Componend on the Form
so i will get the message "Not an Array". 

I use these Components: gb gb.form gb.gui and gb.settings.

When i call the settings from a modul so it will be work.

Sample Solution:

Fmain.class:
' Gambas class file

PUBLIC SUB Settings_Click()

    modValue.values(LAST.tag)     

END

modValue.module:
' Gambas module file

EXPORT SUB values(Action AS String)
  SELECT CASE Action
    CASE "save"
      settings["Windows/Top"] = FMain.Top
      settings["Windows/Left"] = FMain.Left
      settings["Windows/Width"] = FMain.Width
      settings["Windows/Height"] = FMain.Height
      
    CASE "load"
      FMain.top = settings["Windows/Top", FMain.Top]
      FMain.left = settings["Windows/Left", FMain.Left]
      FMain.Width = settings["Windows/Width", FMain.Width]
      FMain.Height = settings["Windows/Height", FMain.Height]
  END SELECT
END SUB  

Fmain.form:
# Gambas Form File 2.0

{ Form Form
  MoveScaled(0,0,50,50)
  Text = ("")
  Icon = Picture["Logo.png"]
  { edit Menu
    Text = ("Bearbeiten")
    { Settings Menu
      Text = ("Einstellungen")
      { Save Menu Settings
        Name = "Save"
        Text = ("Sichern")
        Tag = "save"
      }
      { load Menu Settings
        Name = "load"
        Text = ("Laden")
        Tag = "load"
      }
    }
  }
}

if there a chance to use the settings componend in the form?

andreas

-- 
View this message in context: http://www.nabble.com/%22Settings%22-Component-MIA-tp21606478p23283089.html
Sent from the gambas-devel mailing list archive at Nabble.com.





More information about the Devel mailing list