Yet another version.. 1.33

Sorry about the number of releases coming out at the moment, but it’s mostly jucer improvements. The last version of the jucer was a bit buggy, so thought I’d release this one asap, with loads of bugfixes and useful new features.

* fixed some graphics error with path strokes, and optimised the stroke creation code
* improved the ellipse and rounded rectangle path routines by using cubic approximations
* couple of extra methods for the AsyncUpdater class
* changed sliders so that they now use a SliderListener class to receive callbacks instead of using ChangeListeners
* Jucer: lots and lots of bugfixes!
* Jucer: added options for converting text and other graphics elements into paths
* Jucer: Viewports can now have a content component specified, which may be a Jucer component
* Jucer: TabbedComponents can now be edited and have the contents of each tab specified
* Jucer: Added a list of extra callback methods that can be added to the code automatically
* Jucer: Added an option to images to change the stretch mode
* Jucer: Graphic objects can now use an ImageBrush for their fill or stroke
* Jucer: You can now drag-and-drop image files onto the graphics element editor page
* Jucer: Added a tooltip property to those components that implement the SettableTooltipClient interface
* Jucer: Gave it an icon
* Jucer: Sliders now create a SliderListener callback

DAMN YOU!!!

i love new versions, but i’ve got exams and can’t spend time playing with them! but do i? of course i do!!

although my tutorial needs some proper updating, especially with the slider change… in two weeks i’ll have all the time in the world to get juce.haydxn.net up and running

Sorry to keep you from your studies!

From now I will let all my hairs grow and eat only lemons and oranges as a sign of reverence to your sanctifying power.

Very nobel, but I’ve actually shaved the beard since that photo was taken…

jules, in the jucer i catched some weird when closing the app…

[code] void shutdown()
{
delete theMainWindow;
theMainWindow = 0;

    deleteAndZero (commandManager);
}

    void systemRequestedQuit()
{
    if (theMainWindow == 0 || theMainWindow->closeAllDocuments())
    {
        deleteAndZero (theMainWindow);

        StoredSettings::deleteInstance();

        quit (false);
    }
}[/code]

could be that if mainWindow is zero, then u delete and zero it ? and after systemRequested, shutdown is called and you deleting window twice without any check on its consistency.

[quote=“kraken”]jules, in the jucer i catched some weird when closing the app…

[code] void shutdown()
{
delete theMainWindow;
theMainWindow = 0;

    deleteAndZero (commandManager);
}

    void systemRequestedQuit()
{
    if (theMainWindow == 0 || theMainWindow->closeAllDocuments())
    {
        deleteAndZero (theMainWindow);

        StoredSettings::deleteInstance();

        quit (false);
    }
}[/code]

could be that if mainWindow is zero, then u delete and zero it ? and after systemRequested, shutdown is called and you deleting window twice without any check on its consistency.[/quote]

It’s perfectly ok to delete a null pointer. Or have I misunderstood what you’re asking here?

yes ? oh i thought deleting a 0 memory location isn’t a good thing. so i can get rid of all those “if (xxx) deleteAndZero (xxx)” and just throw in “deleteAndZero (xxx)” ?

me too! :oops:

To be honest, it’s not so long ago I realised this myself, but in c++ the delete operator has to check for a null pointer, so it’s safe to call.

i have to try debug “delete 0;” and see what happens in crt implementation… indeed was one of the things professors from informatics uni teach me at beginning some years ago… maybe standard ansi c++ implementations have changed a lot from that moment. this is gr8 to know ! so probably now could be permitted do “switch(string) { case “hello”: … }”, which was one of the first things i didn’t understand whenentering c programming, why compilers don’t like that… :stuck_out_tongue: don’t tell me so… if so i have to read a newer version of the course’ book “Programming Languages” then !

welllll…

i’ve heard that the whole “is it ok to delete a null pointer?” question as used as a trick question in job interviews…
the answer being, “Yeah, usually. But be careful that a class isn’t overloading the delete operator and forgetting to checkfor nullness…”

Just to pick nits.