On 8/17/10 9:53 AM, Jim Byrnes wrote:
> John Fabiani wrote:
>> On Tuesday, August 17, 2010 08:45:14 am Jim Byrnes wrote:
>>>> Most of the time the "NoneType" is saying the the object does not
>>>> exist. I think it applies to your error message.
>>>
>>> OK, is there anyway to determine what object it is looking for?
>>>
>>>> If you are using the ClassDesigner I would do the following to play and
>>>> learn a little more.
>>>>
>>>> I would add the dropdown to the form. Fillin the choices
>>>> properties. Run the form. Use the dShell (control-d to open) and try
>>>> accessing the value. by typing the following (the same is true with my
>>>> form:
>>>>
>>>> self.RegID.Value #change the RegID to match what you used in RegID
>>>
>>> If I do this from dShell Value is correct and no error message is
>>> displayed. If I run my program Value is correct but the error message
>>> appears.
>>>
>>> The maddening thing about this is I based my code on the Pycon tutorial
>>> I completed and which runs fine. I have opened the corresponding files
>>> side by side in my editor and still can't see where I went wrong.
>>>
>>> Thanks for your efforts,
>>
>> This is a SWAG but if it works in dShell then maybe you just have the
>> relative
>> access wrong in the code. Try things like "self.RegID.Value",
>> "self.Form.RegID.Value", or even "self.parent.RegID.Value" in the code.
>> Normally, you find the correct relation by using dShell. So tell me what you
>> typed in dShell to find the value.
>
> In the dShell if I type self.PwordsCategories.Value I get what was
> selected in the dDropdownList and no Dabo error. The thing is when I run
> my code I don't even have to get the Value, simply opening the
> dDropddownList and selecting any item will trigger the error:
>
> Dabo Error Log: Tue Aug 17 11:39:35 2010: Could not bind to
> 'categories.Category'
> Reason: 'NoneType' object has no attribute 'Category'
Sounds like you never called form.addBizobj("categories")
In any case, the DataSource you assigned to the control ("categories") doesn't
match
up with the DataSources of any of the bizobjs assigned to the form.
Paul
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]