none
Cannot Get Fremy Extension To Work RRS feed

  • Question

  • In a previous thread (http://social.msdn.microsoft.com/Forums/en-US/smallbasic/thread/7ef1229c-528e-4276-9d59-57faa7cdbe67) it was suggested to me to use the Fremy Extension.

    I downloaded it, put the FC.dll and FC.xml in the folder I made named lib, located in the Smallbasic folder. The instructions for it said to put GraphicWindow.Show() on the first line and then on the next line put DR. I did all of that but it is not working. I found some example programs of using the Fremy Extension. I ran the various examples but they are complaining about "cannot find object".

    What would I need to do to get this extension going?

    Thanks,

    Saturday, January 22, 2011 3:15 PM

Answers

  • Yes, most of the examples are for another version, the one without FC before each class. Here are some examples:

    Multiple Windows:

    GraphicsWindow.Show()
    FCInstances.MainSub("Mainsub")
    Sub MainSub
      id1 = FCInstances.Add("Window2", "")
    EndSub
    Sub Window2
      GraphicsWindow.DrawText(0, 0, "Window2")
    EndSub
    GraphicsWindow.DrawText(0, 0, "Window1")

    Drawing:

    GraphicsWindow.Show()
    canvas = FCDrawings.CreateGraphics(300, 300)
    FCDrawings.DrawRectangle(canvas, "Green", 2, 5, 5, 100, 100)
    image = FCDrawings.GenerateImage(canvas)
    Shapes.AddImage(image)

    Clipboard:

    FCClipboard.SetText("Text")
    TextWindow.WriteLine(FCClipboard.GetText())

    Controls:

    GraphicsWindow.Show()
    browser = FCControls.AddWebBrowser(GraphicsWindow.Width, GraphicsWindow.Height)
    FCControls.SetUrlOfWebBrowser(browser, "http://google.com/")

    Dialogs:

    FCDialogs.T_PromptDialogTitle = "Hello!"
    input = FCDialogs.AskForTextLine("What is your name?")
    TextWindow.WriteLine(input)

    FCExtensions:

    FCExtensions.Eval("TextWindow.Writeline(" + Text.GetCharacter(34) + "Hello" + Text.GetCharacter(34)+ ")")


    ~~AirWaves!!~~
    • Marked as answer by SperryRuss Monday, January 24, 2011 12:25 AM
    Sunday, January 23, 2011 10:46 PM

All replies

  • There may be some problems:

    1. Are you using the lates version of smallbasic? (0.9)

    2. Is the .dll and .xml located in the C:\Program Files\Microsoft\Small Basic\lib?

    If none of these work, try restarting your computer, which worked for me, or re-download the extension, or re-download small basic just in case if it isn't the latest version.


    ~~AirWaves!!~~
    Saturday, January 22, 2011 6:14 PM
  • Where you put DR should be FC, then a bunch of classes should pop up in the intellisense wheel, some like FCCLipboard, FCControls, and FCDialogs.
    ~~AirWaves!!~~
    Saturday, January 22, 2011 6:16 PM
  • I uninstalled Small Basic then re-downloaded it (version 9). Then re-downloaded the Fremy Extension. I then re-installed everything and rebooted.

    I think that because I was putting DR at the begining instead of FC was the reason I could see no results. When I type FC in now I see the classes in the intellisense wheel.

    But I still cannot run examples programs that Fremy has. Maybe they were for another version?

    Can you point me to examples that use the extension that use some of the features in a GUI window? Or, make an example code for me to try and run?

     

    Thanks Again,

    Sunday, January 23, 2011 5:41 PM
  • Yes, most of the examples are for another version, the one without FC before each class. Here are some examples:

    Multiple Windows:

    GraphicsWindow.Show()
    FCInstances.MainSub("Mainsub")
    Sub MainSub
      id1 = FCInstances.Add("Window2", "")
    EndSub
    Sub Window2
      GraphicsWindow.DrawText(0, 0, "Window2")
    EndSub
    GraphicsWindow.DrawText(0, 0, "Window1")

    Drawing:

    GraphicsWindow.Show()
    canvas = FCDrawings.CreateGraphics(300, 300)
    FCDrawings.DrawRectangle(canvas, "Green", 2, 5, 5, 100, 100)
    image = FCDrawings.GenerateImage(canvas)
    Shapes.AddImage(image)

    Clipboard:

    FCClipboard.SetText("Text")
    TextWindow.WriteLine(FCClipboard.GetText())

    Controls:

    GraphicsWindow.Show()
    browser = FCControls.AddWebBrowser(GraphicsWindow.Width, GraphicsWindow.Height)
    FCControls.SetUrlOfWebBrowser(browser, "http://google.com/")

    Dialogs:

    FCDialogs.T_PromptDialogTitle = "Hello!"
    input = FCDialogs.AskForTextLine("What is your name?")
    TextWindow.WriteLine(input)

    FCExtensions:

    FCExtensions.Eval("TextWindow.Writeline(" + Text.GetCharacter(34) + "Hello" + Text.GetCharacter(34)+ ")")


    ~~AirWaves!!~~
    • Marked as answer by SperryRuss Monday, January 24, 2011 12:25 AM
    Sunday, January 23, 2011 10:46 PM
  • Wow! Good example. It ran for me. Windows were popping up everywhere, thought a virus had taken over :)

    Now that I have this stuff set up I will see what I can learn about programming.

     

    Thanks,

    Sperry

     

    Monday, January 24, 2011 12:27 AM