Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1432 closed defect (invalid)

dojo.style.setStyle working?

Reported by: ole_ersoy@… Owned by: Bryan Forbes
Priority: high Milestone:
Component: Style Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description

I've been trying to use dojo.style.setStyle, however it is not being called.

I put an alert inside the beginning of the function to check.

I also made sure it's being loaded, by doing alert(dojo.style.setStyle);

Here's the really weird thing.

The alert shows the setStyle code, however the alert I put in is not there.

So just to make sure I setup the path right in the page, I put an alert inside dojo.collections.Dictionary as well, and created a new dictionary.

The alert triggered.

Any ideas?

Attachments (1)

testStyle0.html (1.1 KB) - added by guest 13 years ago.

Download all attachments as: .zip

Change History (6)

Changed 13 years ago by guest

Attachment: testStyle0.html added

comment:1 Changed 13 years ago by ole_ersoy@…

I attached the test file.

Note I just tried dojo.style.setStyle()

without any arguments because I just want the alert to be triggered.

comment:2 Changed 13 years ago by guest

severity: minormajor

OK - After trying just about every trick I could think of, I finally decided to make it real simple and just delete everything in style.js and just have an alert there, like this:

alert('loading');

Still nothing.

So, I copy style.js and name it mink.js and I change

dojo.provide('dojo.style')

to

dojo.provide('dojo.mink')

Then I require dojo.mink in the test page.

Now I get the alert.

So there must be some dojo.style loading thing going on in one of the initial files that dojo loads...bootstrap.js, etc.

Here are my system parameters:

Running on Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc3 Firefox/1.0.7

comment:3 Changed 13 years ago by dylan

Milestone: 0.4
Owner: changed from anonymous to Bryan Forbes

comment:4 Changed 13 years ago by Tom Trenka

Resolution: invalid
Status: newclosed

The 0.4 release moves the setStyle method into html proper; you'll need to call dojo.html.setStyle(node, classname) as opposed to dojo.style.setStyle.

Aside from the idea that setStyle will break if you try to pass it no arguments, I don't see any reason why your code won't work as is. Please take a pass with it with the 0.4 HEAD, make the change to dojo.html.setStyle, and see if that works for you.

comment:5 Changed 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.