Index
2009-06-26 16:34 – Mike Mabey : [dabo-users] RegID with strings
2009-06-26 16:43 – Ed Leafe : Re: [dabo-users] RegID with strings
2009-06-29 12:34 – Miguel Lopes : Re: [dabo-users] RegID with strings
Back to top
[dabo-users] RegID with strings

Author: Mike Mabey

Posted: 2009-06-26 16:34:40   Link

Hi all,

Is it possible to access an object with its RegID using a string? For

example, say I had a list of strings which corresponded several RegIDs in

the app, could I do something like this:

ids = ['dateText', 'name', 'location']

for x in ids:

self.Form.getElementByRegID(x).Value = someVal

??

Sorry, sometimes I can't help but think in terms of JavaScript.

Thanks,

Mike M.

--- StripMime Report -- processed MIME parts ---

multipart/alternative

text/plain (text body -- kept)

text/html

---

©2009 Mike Mabey
Back to top
Re: [dabo-users] RegID with strings

Author: Ed Leafe

Posted: 2009-06-26 16:43:39   Link

On Jun 26, 2009, at 3:34 PM, Mike Mabey wrote:

> Is it possible to access an object with its RegID using a string? For

> example, say I had a list of strings which corresponded several

> RegIDs in

> the app, could I do something like this:

>

> ids = ['dateText', 'name', 'location']

> for x in ids:

> self.Form.getElementByRegID(x).Value = someVal

>

> ??

>

> Sorry, sometimes I can't help but think in terms of JavaScript.

getattr(self.Form, x)

-- Ed Leafe

©2009 Ed Leafe
Back to top
Re: [dabo-users] RegID with strings

Author: Miguel Lopes

Posted: 2009-06-29 12:34:31   Link

On Fri, Jun 26, 2009 at 9:43 PM, Ed Leafe <ed@leafe.com> wrote:

> On Jun 26, 2009, at 3:34 PM, Mike Mabey wrote:

>

> > Is it possible to access an object with its RegID using a string? For

> > example, say I had a list of strings which corresponded several

> > RegIDs in

> > the app, could I do something like this:

> >

> > ids = ['dateText', 'name', 'location']

> > for x in ids:

> > self.Form.getElementByRegID(x).Value = someVal

> >

> > ??

> >

> > Sorry, sometimes I can't help but think in terms of JavaScript.

>

> getattr(self.Form, x)

>

>

> -- Ed Leafe

>

> But also:

self.Form.getObjectByRegID(x)

Miguel

--- StripMime Report -- processed MIME parts ---

multipart/alternative

text/plain (text body -- kept)

text/html

---

©2009 Miguel Lopes