[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-Modules] Help: Dynamic list dialog boxes from MacPerl



I'm writing a little perl module that parses a css file for classes to
offer a choice for input into BBEdit. The author may choose between div,
span or standard elements.

I would like a dialog box list to pop up with a list of elements. The list
would be dependant on whether the user clicks a radio button selecting
"DIV", "SPAN" or "Standard".

I can do this pretty easily using the Dialog Director osax in Applescript.
However I'd like to do this all through MacPerl if possible. I have no
experience in writing custom dialog boxes through MacPerl, and would like
some pointers. 

A Dialog Director list example (from Hyde's own set) is:

dd install with fonts [
    {name:"Geneva", size:9}, null, null, null, {style:underline}] 
    with grayscale
    dd make dialog {size:[370, 190], style:standard window,
    closeable:true, contents:[¬
        {   class:list box, contents:Sort(l, order - 4), bounds:[8, 24,
            362,182],   
            column widths:[140, 40, 80]}, ¬
        {   class:poly push button, bounds:[12, 4, 38, 17]}, ¬
        {   class:poly push button, bounds:[152, 4, 173, 17]}, ¬
        {   class:poly push button, bounds:[192, 4, 214, 17]}, ¬
        {   class:static text, contents:"Name", bounds:[12, 4, 38,
            17],font:5}, ¬
        {   class:static text, contents:"Size", bounds:[152, 4, 174, 17]},
        {   class:static text, contents:"Date", bounds:[192, 4, 214, 17]} ¬
    ], name:"Sorted List Demo"}

I've had a look at the simple dialog box examples in the standard
distribution. I can't find a way of producing a custom list box - a larger
version of MacPerl::Pick(PROMPT, VALUES), with the radio buttons I
mentioned above.

Another problem is that I can't find a sensible way of getting a dialog
window to appear as though it comes from BBEdit. Even modal dialogs appear
as though from Macperl, rather than BBEdit. I note there is a thread about
this on the archive, which I take to mean that the modal dialog should pop
up above all applications.

<http://bumppo.net/lists/macperl/1999/06/msg00230.html>

Any pointers would be gratefully received.

Regards

Rory

p.s. I only receive the digests of these lists.

--
		  Rory Campbell-Lange   +   The Campbell-Lange Workshop
 			                  London




==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-modules-request@macperl.org