Chris,

Excellent question.  With the new code (below), I still get the problem (albeit 
with a red isigraph widget): the dialog appears briefly, then disappears, 
returning the default.

FWIW, I get the same behavior when selecting File | Open in folder | temp.

On the other hand, File | Recent displays a persistent dialog—that is, it 
behaves.

Thank you.

Ed

load 'gl2'

popDialog =: {{
result =. wd 'mb query mb_yes =mb_no "Yes or No?"'
if. result -: 'yes' do. smoutput 'Yes!' else. smoutput 'No!' end.
}}


buildWindow =: {{
wd 'pc vizform;'
wd 'bin h'
wd   'cc vocContext isigraph;'
wd   'cc pop button; cn *Show Dialog'
wd 'bin z'
}}

vizform_vocContext_paint =: {{
glfill_jgl2_ 255 0 0 255
}}

vizform_close =: {{
wd 'pclose'
}}

vizform_pop_button =: {{
popDialog ''
}}

go =: {{
buildWindow ''
wd 'pshow'
}}

go ''


Engine: j9.5.0-beta7/j64avx2/darwin
Build: commercial/2023-09-15T21:06:17/clang-14-0-0/SLEEF=1
Library: 9.5.4
Qt IDE: 2.5.1/6.5.2(6.5.2)
OS Ver: macOS Ventura (13.4) 22.5.0
Platform: Darwin 64
Installer: j9.5 install
InstallPath: /applications/j9.5
Contact: www.jsoftware.com
   
> On Sep 21, 2023, at 2:02 PM, chris burke <cbu...@jsoftware.com> wrote:
> 
> I don't see this problem on macOS Monterey.
> 
> What happens if you define a paint handler for the isigraph? Try
> 
> vizform_vocContext_paint=: {{
> glfill_jgl2_ 255 0 0 255
> }}
> 
> On Thu, Sep 21, 2023 at 5:04 AM Ed Gottsman <edward.j.gotts...@gmail.com> 
> wrote:
>> 
>> Raul,
>> 
>> That’s two mistakes. Wrong list and I shipped the commented version of the 
>> code.  Apologies for both.
>> 
>> Ed
>> 
>>> On Sep 21, 2023, at 12:31 PM, Raul Miller <rauldmil...@gmail.com> wrote:
>>> 
>>> (this probably should have been sent to general@ instead of programming@)
>>> 
>>> When I remove the NB. in front of the isigraph line, I still get
>>> normal behavior from this on my windows machine. So I am going to
>>> guess that there's something about the OSX environment triggering the
>>> problem.
>>> 
>>> --
>>> Raul
>>> 
>>> On Thu, Sep 21, 2023 at 5:26 AM Ed Gottsman <edward.j.gotts...@gmail.com> 
>>> wrote:
>>>> 
>>>> H, again.  Below is sample code that exhibits an interesting property on 
>>>> my Mac: the dialog that pops up when “Show Dialog” is clicked disappears 
>>>> immediately with the default response selected—no user interaction 
>>>> required.
>>>> 
>>>> Commenting out wd ‘cc vocContext isigraph’ creates a window without an 
>>>> isigraph, which fixes the problem.
>>>> 
>>>> It looks like there's something odd about isigraph.
>>>> 
>>>> Also, while I can’t be sure, I suspect this problem manifested when I 
>>>> upgraded to the new beta.
>>>> 
>>>> Thank you.
>>>> 
>>>> Ed
>>>> 
>>>> popDialog =: {{
>>>> result =. wd 'mb query mb_yes =mb_no "Yes or No?"'
>>>> if. result -: 'yes' do. smoutput 'Yes!' else. smoutput 'No!' end.
>>>> }}
>>>> 
>>>> 
>>>> buildWindow =: {{
>>>> wd 'pc vizform;'
>>>> wd 'bin h'
>>>> NB. wd   'cc vocContext isigraph;'
>>>> wd   'cc pop button; cn *Show Dialog'
>>>> wd 'bin z'
>>>> }}
>>>> 
>>>> vizform_close =: {{
>>>> wd 'pclose'
>>>> }}
>>>> 
>>>> vizform_pop_button =: {{
>>>> popDialog ''
>>>> }}
>>>> 
>>>> go =: {{
>>>> buildWindow ''
>>>> wd 'pshow'
>>>> }}
>>>> 
>>>> go ''
>>>> 
>>>> Engine: j9.5.0-beta7/j64avx2/darwin
>>>> Build: commercial/2023-09-15T21:06:17/clang-14-0-0/SLEEF=1
>>>> Library: 9.5.4
>>>> Qt IDE: 2.5.1/6.5.2(6.5.2)
>>>> OS Ver: macOS Ventura (13.4) 22.5.0
>>>> Platform: Darwin 64
>>>> Installer: j9.5 install
>>>> InstallPath: /applications/j9.5
>>>> Contact: www.jsoftware.com
>>>> ----------------------------------------------------------------------
>>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>> 
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to