On 6/28/13 7:13 AM, John Fabiani wrote:
> On 06/28/2013 07:01 AM, Paul McNett wrote:
>> On 6/24/13 4:02 PM, John Fabiani wrote:
>>> Is it possible to set a different None Display value for a control?
>> Yes.
>>
>>> I'd like to set the None value of a MaskedTextBox to something other than 
>>> "< None >".
>> dMaskedTextBox derives from dTextBoxMixin, which defines NoneDisplay. Have 
>> you tried
>> setting ctrl.NoneDisplay = "<nada>"?
>>
>> Paul
>>
> Yes but some where in the framework it gets reversed.  That said, I did not 
> have time
> to determine the reason it reverted back.  I was trying to change the default 
> because
> I thought it was causing a strange problem on a few machines (flashing of a 
> edit
> box).  I removed the control and discovered the flashing was still there. 
> Therefore,
> not the problem.  The network guy suggested deleting and recreating the user
> profile.  He had seen something like that in the past.  Turns out he was 
> right - that
> fixed the issue.  So I did not pursue.

The implementation of NoneDisplay in dTextBoxMixin is very simple. I just 
looked over
the code and can't see how it could get reset to app.NoneDisplay.

To help sort it out, change app.NoneDisplay to "<App None>", and change your
control's NoneDisplay to "<My None>", and then run your app. If you set your
control's value to None and see "<App None>", then I guess you need to set a
breakpoint[1] on _setNoneDisplay() in dTextBoxMixin and re-run, and find out 
what
call is making that happen.

[1] I sometimes use a poor-man's breakpoint: 1/0 which will raise 
ZeroDivisionError
presenting a complete stack trace. In this case, you'll probably want to allow 
some
calls to go through and see the stack trace on others. For this, how about:

        if dabo.ui.areYouSure("break?"):
                1/0

Paul


        
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to