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

[REBOL] Re: Finding all objects derived from a specific object.

From: wayne::knowngood::com at: 28-Oct-2006 16:46

I have been working on code to add or remove an value from a global variable, but can't get the removal portion working. When I remove an entry everything appears to be working fine in that no errors are given, but the value remains in the list. The returned value is 'g-profiles' with no modification. This is what my 'profile' object looks like: g-profiles: to-list [] profile: make object! [ name: modified: desc: attribs: none init: func [ "Returns a new profile and registers the profile" p-name [string!] "Profile name" p-desc [string!] "Profile description" ][ name: p-name modified: now/date desc: p-desc attribs: to-list [] g-profiles: append g-profiles name ] unset: func [ "Unregister the profile and clear all values" ][ g-profiles: exclude g-profiles to-list name modified: now/date name: desc: attribs: none ] ] When I create a profile with: t: make profile [] t/init "Name" "Desc" Name is added to g-profiles successfully if the 'init' function is called. When I type: t/unset All of the variables except 'modified' are set to 'none', but "Name" is not removed from g-profiles. At first I was thinking this might be a name space issue, but adding the profile to g-profiles works with no problems. The same commands also work when typed into the console without using an object with no problems. I'm out of ideas on where to look next, does anyone have any suggestions on what the problem might be or where I should look? Thanks for any help, Wayne