Simon,
                        The problem is probably due to the fact that you use
the Symbol_Type variable in your Do Case without initializing it first;
                        Try initializing your variable (Symbol_type =
MakeSymbol (33,red,12)) before calling your Do Case.

                        Serge

                                -----Original Message-----
                                From:   SIMON HUME
[mailto:[EMAIL PROTECTED]]
                                Sent:   Wednesday, August 30, 2000 11:32 AM
                                To:     [EMAIL PROTECTED]
                                Subject:        MI Basic MapBasic query

                                I'm new to MapBasic and am trying to write a
small program to enable a
                                colleague to start using MapInfo for their
work.  This is my program so
                                far:

                                Include "c:\program
files\mapinfo\professional\icons.def"
                                Include "c:\program
files\mapinfo\mapbasic\menu.def"
                                Include "c:\program
files\mapinfo\mapbasic\mapbasic.def"

                                Dim Symbol_type as Symbol
                                Dim Line_chosen as Integer

                                Declare Sub Main
                                Declare Sub Enter_Details
                                Declare Sub Set_Symbol_Type

                                Sub Main
                                Create ButtonPad "X" As
                                PushButton
                                ID 501
                                Icon 42
                                Calling Enter_Details
                                End Sub

                                Sub Enter_Details
                                        Dialog
                                                Title"Title Bar"
                                                Width 150               
                                                Height 50
                                                Position 50, 170
                                        Control StaticText
                                                Title "Title Bar"
                                                Position 10, 12
                                        Control PopupMenu
                                                Title "This;That;Then;Now"
                                                Position 50,10
                                                Width 100
                                                Height 20
                                        
                                        Control OKButton
                                        Control CancelButton

                                '**end dialog

                                        If CommandInfo(CMD_INFO_DLG_OK) then

                                        Do Case Symbol_Type
                                                Case "1"
                                                        Symbol_type =
MakeSymbol (33,red,12)
                                        End Case
                                        End if
                                End Sub


                                The program loads into MapInfo okay.
Selecting the first option on the
                                drop-down menu (called First), however,
displays  the following error
                                message appears

                                (mybuttonpad.mb:42) Cannot use an
uninitialized symbol variable in an
                                expression

                                Can anybody help me with this - I've looked
through the manual but can't
                                seem to pinpoint anything

                                Regards


                                Simon

        
________________________________________________________________________
                                This message has been checked for all known
viruses, by Star Internet, 
                                delivered through the MessageLabs Virus
Control Centre. 
                                For further information visit:
                                http://www.star.net.uk/stats.asp
        
----------------------------------------------------------------------
                                To unsubscribe from this list, send e-mail
to [EMAIL PROTECTED] and put
                                "unsubscribe MAPINFO-L" in the message body,
or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to