Juce Tutorial - beginnings

I have about 4 and a half gigs unused with about 190 gigs transfer a month unused if you need any temporary (long-term even) space…

My hero! :smiley:

The links to the juce tutorial are broken. Does anyone know where I can get them.

Thanx a lot
Jan

Works for me, but I emailed you a copy (the one I got before)

hi haydxn
i’m having trouble finding help so i figured i’d try your tutorial.

i got one error when trying to build.
Error 1 ‘Sub Main’ was not found in ‘Juce turorial’.

using visual studio 2005.
any ideas?

just loaded the official juce_application.sln and searched the whole solution for Sub Main and i didnt find anything in 639 files

“Sub Main” ???

Jesus! What next? “Dim Component”?

lol

[ lb, no idea what your talking about but I believe haydxns tutorials are several million years out of date. this sticky should be removed? And “Sub”? please tell me your not using VB !! ]

lolol

yeah i know theyre a bit out of date but i figured that they could be updated with a little guidance. it’d be a shame for his efforts to go to waste.

and no i’m not using visual basic lol :lol: but when i did install visual studio, the only things i installed were VB and VC++.

and when it asked me how i would be using VS, instead of choosing mainly for C++ i chose for general purpose reasons.

i’m thinking that might be a problem but havent been able to find the option to change it back to mainly for c++ use.

ok so i got the whole c++/VB thing figured out with some help at the visual studio forums. i had to go to tools>import and export settings.

as for the code i get 2 errors now( a lot less than i thought i would).
one i managed to fix(so far). in the MainDialog() constructor, addToDesktop needed to be written like this:
addToDesktop (ComponentPeer::windowAppearsOnTaskbar);

now the only problem is this :
.\ApplicationStartup.cpp(55) : error C2661: ‘juce::DialogWindow::DialogWindow’ : no overloaded function takes 2 arguments

which is referring to this line :
MainDialog()
: DialogWindow( AppSettings::appName, Colours::lightgrey )

and i looked in the juce.chm(current copy on the website) and it looks a bit different:

DialogWindow (const String &name, const Colour &backgroundColour, const bool escapeKeyTriggersCloseButton, const bool addToDesktop=true)

but it still can take arguments, and i havent been able to figure out how to get it to work right.

any ideas?

[quote=“alakra”]haydxn, thanks for writing this tutorial, i just started it a few hours ago and it is easy to understand.

I’m using Dev CPP (Bloodshed) on XP and had some trouble compiling the tutorial with version 1.24 of JUCE (i’m very new to oop for c++).

After studying my output, i was able to figure out that your code has this:

: DialogWindow ( AppSettings::appName, Colours::lightgrey )

on line 54

I had to change it to this:

: DialogWindow ( AppSettings::appName, Colours::lightgrey, 1, 1 )

to get it to work.

Is this is an error or something compiler specific?

Thanks again,

Angelo Lakra[/quote]

ahh thats what that error meant :oops:
man C++ should be renamed to C?? or CWTF?? :stuck_out_tongue:

anyway i got two linker errors now well one error one warning:
LINK : warning LNK4075: ignoring ‘/INCREMENTAL’ due to ‘/OPT:ICF’ specification

have no idea what that one means. anyone have an idea?

LINK : fatal error LNK1181: cannot open input file ‘C:\Documents.obj’

is this one because i have spaces in my path?

C:\Documents and Settings\All Users\Documents\Source\juce_1_41\juce\bin

should i just have wrote juce\bin?

-edit-
i just deleted the linker command from my linker options and ran the debugger. i still got the warning but the program ran.

anyone familiar with this linker warning?

P.S.
the app already has 3 buttons and a slider. i thought it was supposed to be
blank…

okay, i promise i’m going to update the tutorial soon, but i would appreciate it greatly if someone were able to provide some space for me to host it all!

I you want I have space on my ftp.
Send me a pm and I’ll give you the adress and the pass

sweet i was just gonna ask if u wanted me to update it for you!!!
it probably woulda had crap load of typos if i did though :lol:

i have (free/unreliable)space. it’s yours if u want it.

can’t this forum software do attachments?

I use SMF for our private company forum and its great! you can upload an attachment as part of a post and it sits there ready to be DLed. (images get automagically thumbnailed/click to expand too)

obviously you wouldn’t give global upload permissions on a public forum like this one tho!

does phpBB do attachments? would be ideal for hs tute etc?

[quote=“Karbon L. Forms”]

does phpBB do attachments? would be ideal for hs tute etc?[/quote]

i agree

just got to page 46…

it tells me to type this code for the text box to manipulate the slider:

void changeListenerCallback (void* changeSource)
{
       .....blah u know the rest...


}

but in the beginning of the tutorial, i couldnt get changeListenerCallback() to behave so i used:

void  sliderValueChanged (Slider* slider)
	{
		if (slider == slider1)
		{
			double value = slider1->getValue ();
			label->setText (String(value, 2), false);
		}
	}

so now i’m trying to figure out how i would make these two functions work together.

any ideas?

-edit-
oh and here’s my label input detection function


void labelTextChanged(Label* editor)
	{
		if (label == editor)
			text = label->getText(true);
		repaint();
	}

so with that, how would i be able to get them to communicate?
arent the parameters bound to the scope of their respected functions?
somehow that sounds contradictory, but they are voided.
help pls?
ho hum…

-edit2-
just added this:

void changeListenerCallback(void* changeSource) { if(changeSource == label) { double value = label->getText().getDoubleValue(); slider1->setValue (value, false); } }

the compiler didnt have any complaints but the slider isnt recieving the value

the tutorial was from a time when the widgets all used the same kind of communication system (either action or change listeners). now, we have different listeners for each type of widget, so a slider has a sliderlistener etc…

thus, the changelistenercallback function is no longer related to a slider. this being quite a big change to the structure of my chapters, it’s one reason of many why i’ve been reluctant to get back into rewriting the tutorial again when i have so many other things i want to do - it just takes up so much of my time! and once i’ve started i have to do a lot to make it worthwhile - i can’t just do a bit first. but i’ll get on it over the next two weeks…

i can edit the tutorial i’ve made plenty of changes to the code but i’m still a newb. i’m more than halfway through it. with just a small ammount of guidance i think i can easily revise it for you

just used this:

void labelTextChanged(Label* editor) { if (label == editor) text = label->getText(true); double value = label->getText().getDoubleValue(); slider1->setValue (value, false); repaint(); }

instead of this:

void labelTextChanged(Label* editor) { if (label == editor) text = label->getText(true); repaint(); } void changeListenerCallback(void* changeSource) { if(changeSource == label) { double value = label->getText().getDoubleValue(); slider1->setValue (value, false); } }

Is it just me or do the links not work now? They just take me to his main site. Those tutorials are something I’m in dire need of as well :frowning: