mesaglam / mad-components

Automatically exported from code.google.com/p/mad-components
0 stars 0 forks source link

UIList Model refresh issue #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Enable UIList.pullDownRefresh
2. Issue a UIList.model.loadJSON("", URLRequest) call, or similar;
3. Pull down.

What is the expected output? What do you see instead?
The list data should be reloaded, but it fails to do so since the URLRequest 
parameter isn't being saved.

What version of the product are you using? On what operating system?
Latest one.

Please provide any additional information below.
I added a new protected var for the request, and replaced these lines in 
loadJSON and loadXML:

            if (!request)
                request = new URLRequest(url);

with:

            if (!request)
                request = _request ? _request : new URLRequest(url);
            else
                _request = request;

If not, maybe the pulldown refresh could launch a custom function instead of 
forcing a refresh.

Original issue reported on code.google.com by neverbi...@gmail.com on 14 Jul 2012 at 1:00

GoogleCodeExporter commented 9 years ago
I've also added a simple getter to Model in order to expose parent, useful 
mainly in event handlers.

Another thing I may change is how the pull down refresh is made... I was 
thinking it would be better to refresh when you release the list.

Original comment by neverbi...@gmail.com on 14 Jul 2012 at 1:43

GoogleCodeExporter commented 9 years ago
Forgot to mention, a problem with previous my replace is that you may want to 
load a simple url on subsequent loadJSON calls, but since you pass a null 
request it may take previous one that was saved, but it's not problem in my 
case.

Original comment by neverbi...@gmail.com on 14 Jul 2012 at 1:45

GoogleCodeExporter commented 9 years ago
Included in the next release.  With this accessor method for _parent:-

        public function get page():Sprite {
            return _parent;
        }

Original comment by doc.andr...@gmail.com on 30 Jul 2012 at 12:34

GoogleCodeExporter commented 9 years ago
I don't see this change nor any other on latest check ins (madComponents 
0.7.6). The only ones available are for ExtendedMadnessLib. Have the changes 
been overlooked? or am I missing something?

Original comment by neverbi...@gmail.com on 6 Aug 2012 at 11:51

GoogleCodeExporter commented 9 years ago
Nevermind, I've just seen the updated main page regarding the SVN issue.

Original comment by neverbi...@gmail.com on 6 Aug 2012 at 11:53