Re:[wxperl-users] wxPerl 0.25 not exporting wxHIDE_READONLY

  Hello,

> Well, I have 0.25 with wxWidgets 2.6.1 up and running now, =
and I'm 
> trying to find out what I have to change to make it all work =
again.

  Partly my error. Sorry.

> First thing I ran into, was that=
 AAC::Pvoice::Panel used Wx::Panel's 
> Clear method, which doesn't seem=
 to exist anymore. Commenting it out 
> worked fine.

  Use ClearBackg=
round() for the same effect.

> However, something that doesn't work an=
ymore and should work according 
> to the docs is the wxHIDE_READONLY st=
yle for Wx::FileDialog. The error 
> I'm getting is:

  You do not nee=
d wxHIDE_READONLY: it is the (nonmodifiable
default now.

> (if you wa=
nt me to submit it to the bugtracker, just say so, but should 
> I use t=
he sf.net bugtracker or CPAN's RT?)

  In general SF's. I like in the b=
ugtracker
low priority things that I will not do soon. I try to do
the =
rest as they are reported. You do not need to put the
things above on th=
e bugtacker.

  I will provide a dummy constant for wxHIDE_READONLY.=0D
=

Regards
Mattia
=0A=0A=0A=0A__________________________________________=
__________________=0A6X velocizzare la tua navigazione a 56k? 6X Web Acce=
lerator di Libero!=0AScaricalo su INTERNET GRATIS 6X http://www.libero.it=
=0A


0
mattia
7/13/2005 2:54:12 PM
perl.wxperl.users 3070 articles. 0 followers. Follow

4 Replies
276 Views

Similar Articles

[PageSpeed] 24

Hello,

>>First thing I ran into, was that AAC::Pvoice::Panel used Wx::Panel's 
>>Clear method, which doesn't seem to exist anymore. Commenting it out 
>>worked fine.
>   Use ClearBackground() for the same effect.
Ah. right. Thanks.

>>However, something that doesn't work anymore and should work according 
>>to the docs is the wxHIDE_READONLY style for Wx::FileDialog. The error 
>>I'm getting is:
> 
> 
>   You do not need wxHIDE_READONLY: it is the (nonmodifiable
> default now.
That's not what I'm seeing. I removed the wxHIDE_READONLY (which I used 
together with wxOPEN...so it was wxOPEN|wxHIDE_READONLY), and indeed the 
'open readonly' checkbox is now visible...I used that style to prevent 
that checkbox from appearing.

Jouke

0
jouke
7/13/2005 3:06:03 PM
Hello,

I've come across the missing wxHIDE_READONLY problem myself - but 
interpreted it somewhat differently.

The 2.6.1 docs say that this deprecated flag toggled the display of a 
checkbox that determined whether read-only files were visible in the dialog.

As the docs state, no such checkbox ever appears in 2.6.1.

What you do get by default on wxMSW at least,  is a checkbox that the 
user can click to indicate that you should OPEN the selected file in 
read-only mode, which is an entirely different thing.

As far as I can tell, there is no way of accessing this checkbox value 
on dialog return so it's useless within wxWidgets. I think this is a bug 
in wxWidgets itself. You should either be able to disable this check box 
or retrieve its value.

But, whatever, as I read it, it has nothing to do with the confusingly 
named 'wxHIDE_READONLY'.

Hope this helps.

Mark


Jouke Visser wrote:
> Hello,
> 
>>> First thing I ran into, was that AAC::Pvoice::Panel used Wx::Panel's 
>>> Clear method, which doesn't seem to exist anymore. Commenting it out 
>>> worked fine.
>>
>>   Use ClearBackground() for the same effect.
> 
> Ah. right. Thanks.
> 
>>> However, something that doesn't work anymore and should work 
>>> according to the docs is the wxHIDE_READONLY style for 
>>> Wx::FileDialog. The error I'm getting is:
>>
>>
>>
>>   You do not need wxHIDE_READONLY: it is the (nonmodifiable
>> default now.
> 
> That's not what I'm seeing. I removed the wxHIDE_READONLY (which I used 
> together with wxOPEN...so it was wxOPEN|wxHIDE_READONLY), and indeed the 
> 'open readonly' checkbox is now visible...I used that style to prevent 
> that checkbox from appearing.
> 
> Jouke
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by the 'Do More With Dual!' webinar 
> happening
> July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
> core and dual graphics technology at this free one hour event hosted by HP,
> AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
> _______________________________________________
> wxperl-users mailing list
> wxperl-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wxperl-users



0
mark
7/13/2005 4:36:06 PM
Hi,

Further to previous email, I've thought about this further and clearly 
the wxWidgets docs and / or implementation is not useful.
The wxHIDE_READONLY works as you suggest - NOT as described in the docs.

I would suggest that until it gets fixed, you use your own workaround.
e.g.
if(version checking says I should kludge) { $HIDE_CHECKBOX = 8; }
......wxOPEN|$HIDE_CHECKBOX)
will do what you want.

I think that the proper fix for this is to get the wxWidgets docs to 
'say the right thing' and even better - allow you to get at the checkbox 
  value if you do allow it to appear.

Don't think there's much Mattia can / should do within wxPerl, though I 
suppose exporting wxHIDE_READONLY would stop apps from breaking.

Regards

Mark


Jouke Visser wrote:
> Hello,
> 
>>> First thing I ran into, was that AAC::Pvoice::Panel used Wx::Panel's 
>>> Clear method, which doesn't seem to exist anymore. Commenting it out 
>>> worked fine.
>>
>>   Use ClearBackground() for the same effect.
> 
> Ah. right. Thanks.
> 
>>> However, something that doesn't work anymore and should work 
>>> according to the docs is the wxHIDE_READONLY style for 
>>> Wx::FileDialog. The error I'm getting is:
>>
>>
>>
>>   You do not need wxHIDE_READONLY: it is the (nonmodifiable
>> default now.
> 
> That's not what I'm seeing. I removed the wxHIDE_READONLY (which I used 
> together with wxOPEN...so it was wxOPEN|wxHIDE_READONLY), and indeed the 
> 'open readonly' checkbox is now visible...I used that style to prevent 
> that checkbox from appearing.
> 
> Jouke
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by the 'Do More With Dual!' webinar 
> happening
> July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
> core and dual graphics technology at this free one hour event hosted by HP,
> AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
> _______________________________________________
> wxperl-users mailing list
> wxperl-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wxperl-users



0
mark
7/13/2005 4:59:09 PM
On Wed, 13 Jul 2005 17:03:32 +0200 Jouke Visser <jouke@pvoice.org> wrote:

  Hello,

> >>First thing I ran into, was that AAC::Pvoice::Panel used Wx::Panel's 
> >>Clear method, which doesn't seem to exist anymore. Commenting it out 
> >>worked fine.
> >   Use ClearBackground() for the same effect.
> Ah. right. Thanks.
> 
> >>However, something that doesn't work anymore and should work according 
> >>to the docs is the wxHIDE_READONLY style for Wx::FileDialog. The error 
> >>I'm getting is:
> > 
> > 
> >   You do not need wxHIDE_READONLY: it is the (nonmodifiable
> > default now.
> That's not what I'm seeing. I removed the wxHIDE_READONLY (which I used 
> together with wxOPEN...so it was wxOPEN|wxHIDE_READONLY), and indeed the 
> 'open readonly' checkbox is now visible...I used that style to prevent 
> that checkbox from appearing.

  Now I understand what is going on: you are using your self-compiled wxWidgets,
I was (wrongly) thinking as if you were using the binaries from the site.

  Solution: do what mark Dootson suggested:

sub wxHIDE_READONLY() { 8 }

and use it in your code.

  Explanation: I compiled wxWidgets with wxWidgets 2.4 compatiblity turned off,
you compiled it with compatibility turned on (the default). This bit of code in
src/msw/filedlg.cpp

#if WXWIN_COMPATIBILITY_2_4
    long msw_flags = 0;
    if ( (m_dialogStyle & wxHIDE_READONLY) || (m_dialogStyle & wxSAVE) )
        msw_flags |= OFN_HIDEREADONLY;
#else
    long msw_flags = OFN_HIDEREADONLY;
#endif

means that in my build the flag is always hidden while in your build it is hidden
if and only if you pass the wxHIDE_READONLY flag.

Regards
Mattia


0
mattia
7/13/2005 9:18:52 PM
Reply: