Code Monkey home page Code Monkey logo

demo-ios-drawing's People

Contributors

junpengwang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

xzz1508

demo-ios-drawing's Issues

How to delete all datas under root node.

I want to delete all datas under root node,here is my code:

- (void)clearDatas {
    __weak __typeof(self) weakSelf;
     [[[self.wilddog queryOrderedByKey] queryLimitedToFirst:5] observeEventType:WDGDataEventTypeValue withBlock:^(WDGDataSnapshot *snapshot) {
         NSLog(@"%@",snapshot.value);
         NSEnumerator *children = snapshot.children;
         WDGDataSnapshot *next = children.nextObject;
         while (next) {
            [next.ref removeValue];
             next = children.nextObject;
         }
    }];
}

This is a button event,I want to delete 5 pieces of data every time I click the button.But the problem is,when I first click the button,the snapshot returned contains 5 pieces of data,and I can delete them correctly.
But after the first time,the snapshot returned contains no data,the console shows:

2017-03-09 11:57:17.901947 Wilddog Drawing[5475:2673406] Not a valid path: / -> (null)
2017-03-09 11:57:17.902140 Wilddog Drawing[5475:2673406] (null)

So,there are two questions:
1 how to return correct data after first click.
2 I think deleting datas in this way is not elegant,is there a more convenient way to delete data under the root node?

Data requested exceeds the maximum size.

The method is
self.childAddedHandle = [self.wilddog observeEventType:WDGDataEventTypeChildAdded withBlock:^(WDGDataSnapshot *snapshot) {...}];
When the the requested data is too big,the block won't be called.And the console show the following message:
"too_big, error reason:Data requested exceeds the maximum size that can be accessed with a single request
Data requested exceeds the maximum size that can be accessed with a single request."

In this case,what should I do to get the data?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.